import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
import TextDiff from './pages/tools/TextDiff.vue'
import RegexVisualizer from './pages/tools/RegexVisualizer.vue'
import CodeSnippets from './pages/tools/CodeSnippets.vue'
import Home from './pages/Home.vue'
import ToolDetail from './pages/ToolDetail.vue'
import Favorites from './pages/Favorites.vue'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/tool/:id',
    name: 'ToolDetail',
    component: ToolDetail,
    props: true
  },
  {
    path: '/favorites',
    name: 'favorites',
    component: Favorites
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router 